import 'package:get/get.dart';
import 'package:get/get_connect.dart';
import 'package:school_assistant_m/utils/base_api.dart';

// ignore: camel_case_types
class HomeApi extends BaseApi{
  //获取用户信息请求
  Future<Map<String, dynamic>> getUserInfo() async {
    Response response = await get('/users');
    // print('responseresponseresponseresponseresponseresponseresponseresponse');
    // print(response.body);
    if(response.statusCode==200){
      var result = response.body;
      //存储用户角色
      // List<String> userData = result['']
      return result;
    }
    else {
      return response.body;
      // throw Exception('请求异常......');
    }
  }
}